package o;

import androidx.annotation.NonNull;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;

public abstract class cgg<REQUEST extends BaseRequest, RESPONSE extends ResponseBean> implements IServerCallBack {
    protected abstract void ˋ(@NonNull REQUEST request, @NonNull RESPONSE response);

    public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
        if (o_cvu == null || responseBean == null) {
            Logger.e("StoreCallBackAdapter", "request or response must not be null.");
            return;
        }
        try {
            ˋ(o_cvu, responseBean);
        } catch (Throwable e) {
            Logger.ˋ("StoreCallBackAdapter", "ClassCastException: " + e.getMessage(), e);
        }
    }

    public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
        if (o_cvu == null || responseBean == null) {
            Logger.e("StoreCallBackAdapter", "request or response must not be null.");
            return;
        }
        try {
            ˊ(o_cvu, responseBean);
        } catch (Throwable e) {
            Logger.ˋ("StoreCallBackAdapter", "ClassCastException: " + e.getMessage(), e);
        }
    }

    protected void ˊ(@NonNull REQUEST request, @NonNull RESPONSE response) {
    }
}
